home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / program / bgui12.lha / demos / WallStreet / WallStreet.h < prev    next >
C/C++ Source or Header  |  1995-06-11  |  3KB  |  137 lines

  1. #ifndef WALLSTREET_H
  2. #define WALLSTREET_H
  3. /*
  4.  *    WALLSTREET.H
  5.  *
  6.  *    (C) Copyright 1995 Jaba Development.
  7.  *    (C) Copyright 1995 Jan van den Baard.
  8.  */
  9.  
  10. #include <exec/types.h>
  11. #include <exec/memory.h>
  12. #include <libraries/commodities.h>
  13. #include <libraries/gadtools.h>
  14. #include <libraries/bgui.h>
  15. #include <libraries/bgui_macros.h>
  16. #include <devices/timer.h>
  17. #include <workbench/startup.h>
  18.  
  19. #include <clib/alib_protos.h>
  20.  
  21. #include <proto/exec.h>
  22. #include <proto/bgui.h>
  23. #include <proto/commodities.h>
  24. #include <proto/intuition.h>
  25. #include <proto/dos.h>
  26.  
  27. #include <stdlib.h>
  28. #include <stdio.h>
  29. #include <string.h>
  30.  
  31. #include "WallStreet_rev.h"
  32.  
  33. /*
  34.  *    For DICE it's "MakeProto" tool which
  35.  *    automatically generates a prototypes
  36.  *    header included at the end of this
  37.  *    file.
  38.  */
  39. #define Prototype        extern
  40.  
  41. /*
  42.  *    Object ID's
  43.  */
  44. #define ID_BROKERLIST        1
  45. #define ID_SHOW                 2
  46. #define ID_HIDEBROKERS        3
  47. #define ID_ACTIVE        4
  48. #define ID_REMOVE        5
  49. #define ID_HIDE                 6
  50. #define ID_QUIT                 7
  51. #define ID_ABOUT        8
  52.  
  53. /*
  54.  *    Broker hotkey.
  55.  */
  56. #define CXK_SHOW        1
  57.  
  58. /*
  59.  *    Compiler muck.
  60.  */
  61. #ifdef _DCC
  62. #define SAVEDS __geta4
  63. #define ASM
  64. #define REG(x) __ ## x
  65. #else
  66. #define SAVEDS __saveds
  67. #define ASM __asm
  68. #define REG(x) register __ ## x
  69. #endif
  70.  
  71. /*
  72.  *    Arguments interface.
  73.  */
  74. #define SHELL        "CX_PRIORITY/K/N,CX_POPUP/K,CX_POPKEY/K,PUBSCREEN/K"
  75.  
  76. struct Args {
  77.     LONG        *Pri;
  78.     UBYTE        *Popup;
  79.     UBYTE        *Popkey;
  80.     UBYTE        *PubScreen;
  81. };
  82.  
  83. #define sArgInt(s,d)     s ? *( s ) : d
  84. #define sArgStr(s,d)     s ? s : d
  85.  
  86. /*
  87.  *    The following stuff is based on undocumented
  88.  *    commodities.library stuff. Don't be supprised
  89.  *    if this stuff breaks on future OS's (if they
  90.  *    ever see the light of day...)
  91.  *
  92.  *    Information stolen from the various Exchange clones :)
  93.  */
  94. #pragma libcall CxBase FindBroker 6c 801
  95. #pragma libcall CxBase CopyBrokerList ba 801
  96. #pragma libcall CxBase FreeBrokerList c0 801
  97. #pragma libcall CxBase BrokerCommand c6 802
  98.  
  99. CxObj *FindBroker( UBYTE * );
  100. LONG CopyBrokerList( struct List * );
  101. LONG FreeBrokerList( struct List * );
  102. LONG BrokerCommand( UBYTE *, LONG );
  103.  
  104. struct BrokerCopy {
  105.     struct Node        bc_Node;
  106.     UBYTE            bc_Name[ CBD_NAMELEN ];
  107.     UBYTE            bc_Title[ CBD_TITLELEN ];
  108.     UBYTE            bc_Descr[ CBD_DESCRLEN ];
  109.     LONG            bc_Task;
  110.     LONG            bc_Dummy1;
  111.     LONG            bc_Dummy2;
  112.     UWORD            bc_Flags;
  113. };
  114.  
  115. #define COF_ACTIVE        2
  116.  
  117. /*
  118.  *    The data constructed from the BrokerCopy
  119.  *    structure in the listview resource hook.
  120.  */
  121. struct ListBroker {
  122.     UBYTE            lb_PreParse[ 3 ];
  123.     UBYTE            lb_Name[ CBD_NAMELEN ];
  124.     UBYTE            lb_Title[ CBD_TITLELEN ];
  125.     UBYTE            lb_Descr[ CBD_DESCRLEN ];
  126.     LONG            lb_Task;
  127.     UWORD            lb_Flags;
  128.     ULONG            lb_BuildCount;
  129. };
  130.  
  131. /*
  132.  *    As generated by "MakeProto".
  133.  */
  134. #include "WallStreet_protos.h"
  135.  
  136. #endif
  137.